package com.hwl.server.controller;

import com.hwl.server.entity.Admin;
import com.hwl.server.service.AdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@Api(tags = "在线聊天")
@RestController
@RequestMapping("/chat")
public class ChatController {

    @Resource
    private AdminService adminService;

    @ApiOperation("获取除登录用户以外的所有操作员")
    @GetMapping("/admin")
    public List<Admin> list(String keyWord) {
        return adminService.getAllAdmin(keyWord);
    }
}
